#pragma once
#include <vector>
#include <opencv2/opencv.hpp>
#include "ChessDatabase.h"

// 几何特征结构体
struct GeometricFeatures {
    double area;        // 轮廓面积
    double perimeter;   // 轮廓周长
    double aspectRatio; // 宽高比
};


std::vector<double> extractHuMoments(const cv::Mat& image);
GeometricFeatures extractGeometricFeatures(const cv::Mat& image);
std::vector<double> extractProjectionHistogram(const cv::Mat& image);
std::array<double, 5> extractZoneDensity(const cv::Mat& image);
std::string extractcolor(const cv::Mat& image);
ChessDatabase::ChessPiece extractChessPieceFeatures(
    const std::string& imagePath,
    double x,
    double y,
    const std::string& type
);
ChessDatabase::ChessPiece extractChessPieceFeatures(
    cv::Mat img,
    double x,
    double y,
    const std::string& type
	);